package com.qingke.OMS.Command;

import java.util.HashMap;
import java.util.Map;
import com.qingke.OMS.Command.Imp.AdminHelpCommand;
import com.qingke.OMS.Command.Imp.CheckOrderdsCommandImp;
import com.qingke.OMS.Command.Imp.LoginOut;
import com.qingke.OMS.Command.Imp.addGoods;
import com.qingke.OMS.Command.Imp.checkAllGoodsCommand;
import com.qingke.OMS.Command.Imp.checkAllPeopleCommand;
import com.qingke.OMS.Command.Imp.checkGoodsByCgid;
import com.qingke.OMS.Command.Imp.checkGoodsByCodeCommand;
import com.qingke.OMS.Command.Imp.checkGoodsByName;
import com.qingke.OMS.Command.Imp.checkPeopleByIdCommand;
import com.qingke.OMS.Command.Imp.checkPeopleByUsername;
import com.qingke.OMS.Command.Imp.deleteGoods;
import com.qingke.OMS.Command.Imp.setGoodsdesc;
import com.qingke.OMS.Command.Imp.setGoodsprice;
import com.qingke.OMS.Command.Imp.softDeletePeopleByIdCommand;
import com.qingke.OMS.Unit.LauncherEnum;

public class AdminCommand extends StaticCommandFactory{
	protected static Map<LauncherEnum,Command> adminMap = new HashMap<LauncherEnum,Command>();
	static{

        adminMap.put(LauncherEnum.ADMINHELP, new AdminHelpCommand());
		adminMap.put(LauncherEnum.CHECKALLPEOPLE, new checkAllPeopleCommand());
		adminMap.put(LauncherEnum.CHECKBYID, new checkPeopleByIdCommand());
		adminMap.put(LauncherEnum.CHECKBYUNAME, new checkPeopleByUsername());
		adminMap.put(LauncherEnum.SOFTDELETEPEOPLEBYID, new softDeletePeopleByIdCommand());

		adminMap.put(LauncherEnum.ADDGOODS, new addGoods());
		adminMap.put(LauncherEnum.CHECKALLGOODS,new checkAllGoodsCommand());
		adminMap.put(LauncherEnum.CHECKGOODSBYCODE, new checkGoodsByCodeCommand());
		adminMap.put(LauncherEnum.CHECKGOODSBYNAME, new checkGoodsByName());
		adminMap.put(LauncherEnum.CHECKGOODSBYCGID, new checkGoodsByCgid());
		adminMap.put(LauncherEnum.DELETEGOODS, new deleteGoods());
		adminMap.put(LauncherEnum.SETGOODSPRICE, new setGoodsprice());
		adminMap.put(LauncherEnum.SETGOODSPDESC, new setGoodsdesc());
        

		
		adminMap.put(LauncherEnum.CHECKORDERS, new CheckOrderdsCommandImp());
		adminMap.put(LauncherEnum.EXIT, new ExitCommand());
		adminMap.put(LauncherEnum.LOGINOUT, new LoginOut());
	}

	public Command build(LauncherEnum cmd){
		Command command = adminMap.get(cmd);
		return command;
	}

}
